﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LOLBattleQuery.Do
{
    public class LcuAuthorization
    {


        public long currentAccountId { get; set; }
        public string currentPlatformId { get; set; }
        public string subject { get; set; }

        public int area
        {
            get
            {
                switch (currentPlatformId.Replace("_NEW", ""))
                {
                    case "HN1": return 1;
                    case "HN2": return 3;
                    case "HN3": return 4;
                    case "HN4": return 5;
                    case "HN5": return 7;
                    case "HN6": return 8;
                    case "HN7": return 10;
                    case "HN8": return 11;
                    case "HN9": return 13;
                    case "HN10": return 14;
                    case "HN11": return 15;
                    case "HN12": return 17;
                    case "HN13": return 18;
                    case "HN14": return 19;
                    case "HN15": return 22;
                    case "HN16": return 23;
                    case "HN17": return 24;
                    case "HN18": return 25;
                    case "HN19": return 27;
                    case "WT1": return 2;
                    case "WT2": return 6;
                    case "WT3": return 9;
                    case "WT4": return 12;
                    case "WT5": return 16;
                    case "WT6": return 20;
                    case "WT7": return 26;
                    case "BGP1": return 30;
                    case "BGP2": return 31;
                    case "EDU1": return 21;
                    case "JP1":return 999;
                    case "TW2":return 1000;
                    case "SG2": return 1001;
                    case "KR": return 1002;
                    case "NA1": return 1003;
                    case "PBE1": return 1004;
                    case "VN2": return 1005;
                }
                return -1;
            }
        }

        public static int GetArea(string area)
        {
            switch (area)
            {
                case "艾欧尼亚": return 1;
                case "比尔吉沃特": return 2;
                case "祖安": return 3;
                case "诺克萨斯": return 4;
                case "德玛西亚": return 6;
                case "班德尔城": return 5;
                case "皮尔特沃夫": return 7;
                case "战争学院": return 8;
                case "弗雷尔卓德": return 9;
                case "巨神峰": return 10;
                case "雷瑟守备": return 11;
                case "无畏先锋": return 12;
                case "裁决之地": return 13;
                case "黑色玫瑰": return 14;
                case "暗影岛": return 15;
                case "钢铁烈阳": return 17;
                case "恕瑞玛": return 16;
                case "水晶之痕": return 18;
                case "教育网专区": return 21;
                case "影流": return 22;
                case "守望之海": return 23;
                case "扭曲丛林": return 20;
                case "征服之海": return 24;
                case "卡拉曼达": return 25;
                case "皮城警备": return 27;
                case "巨龙之巢": return 26;
                case "男爵领域": return 30;
                case "均衡教派": return 19;
                case "峡谷之巅": return 31;
                case "日服": return 999;
                case "台服": return 1000;
                case "新加坡服": return 1001;
                case "韩服": return 1002;
                case "美服": return 1003;
                case "美测服(PBE)": return 1004;
                case "越南服": return 1005;
                default:
                    return -1;
            }
        }


        public static string GetArea(int area)
        {
            switch (area)
            {
                case 1: return "艾欧尼亚";
                case 2: return "比尔吉沃特";
                case 3: return "祖安";
                case 4: return "诺克萨斯";
                case 6: return "德玛西亚";
                case 5: return "班德尔城";
                case 7: return "皮尔特沃夫";
                case 8: return "战争学院";
                case 9: return "弗雷尔卓德";
                case 10: return "巨神峰";
                case 11: return "雷瑟守备";
                case 12: return "无畏先锋";
                case 13: return "裁决之地";
                case 14: return "黑色玫瑰";
                case 15: return "暗影岛";
                case 17: return "钢铁烈阳";
                case 16: return "恕瑞玛";
                case 18: return "水晶之痕";
                case 21: return "教育网专区";
                case 22: return "影流";
                case 23: return "守望之海";
                case 20: return "扭曲丛林";
                case 24: return "征服之海";
                case 25: return "卡拉曼达";
                case 27: return "皮城警备";
                case 26: return "巨龙之巢";
                case 30: return "男爵领域";
                case 19: return "均衡教派";
                case 31: return "峡谷之巅";
                case 999: return "日服";
                case 1000: return "台服";
                case 1001: return "新加坡服";
                case 1002: return "韩服";
                case 1003: return "美服";
                case 1004: return "美测服(PBE)";
                case 1005: return "越南服";
                default:
                    return "";
            }
        }

    }
}
